package cn.schoolwow.quickdao.test.module.business.user.dml.json.flow.compare;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class SetCompareUserJSONFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        JSONArray compareUserList = new JSONArray();
        for(int i=0;i<=20;i++){
            JSONObject user = new JSONObject();
            user.put("username", "user"+i);
            user.put("password", "123456");
            user.put("email", "user"+i+"@fake.com");
            user.put("mobile", "12345678911");
            compareUserList.add(user);
        }
        flowContext.putTemporaryData("compareUserList", compareUserList);
    }

    @Override
    public String name() {
        return "检查用户JSON列表比较结果";
    }
}
